import tkinter


n = int(input())
x = int(input())
y = int(input())
master = tkinter.Tk()
canvas = tkinter.Canvas(master, bg='white', height=500, width=500)
canvas.create_rectangle((0 * n + x, 0 * n + y), (10 * n + x, 10 * n + y), fill='red')
canvas.create_rectangle((0 * n + x, 10 * n + y), (10 * n + x, 20 * n + y), fill='purple')
canvas.create_rectangle((10 * n + x, 20 * n + y), (20 * n + x, 10 * n + y), fill='green')
canvas.create_rectangle((0 * n + x, 20 * n + y), (10 * n + x, 30 * n + y), fill='blue')
if n == 0  and x >= 0 and x <= 500 and y >= 0 and y <= 500:
    pass
else:
    if n > 0 and 0 * n + x >= 0 and 0 * + y >= 0 and 20 * n + x <= 500 and 20 * n + y <= 500:
        pass
    else:
        if n < 0 and 20 * n + x >= 0 and 20 * n + y >= 0 and 0 * n + x <= 500 and 0 * n + y <= 500:
            pass
        else:
            print("Размер фигуры превышает максимальный размер поля")
            exit()
canvas.pack()
master.mainloop()
